Instead of assuming that gst-plugins-good has been compiled with
all the plugins we need enabled, explicitly check for the ones
we use.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5710
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2519>
var ScreencastService = class extends ServiceImplementation {
static canScreencast() {
+ const elements = [
+ 'pipewiresrc',
+ 'filesink',
+ ...DEFAULT_PIPELINE.split('!').map(e => e.trim().split(' ').at(0)),
+ ];
return Gst.init_check(null) &&
- Gst.ElementFactory.find('pipewiresrc') &&
- Gst.ElementFactory.find('filesink');
+ elements.every(e => Gst.ElementFactory.find(e) != null);
}
constructor() {